<template>
	<view class="container">
		<image class="city-tech-image" src="/static/city-tech.png" mode="widthFix"></image>
		
		<view class="content">
			<view class="selects">
				<view class="select-item" @click="onClickRealNameReport">
					<image src="/static/real-name-report.png" mode="aspectFill"></image>
					<text>实名求助</text>
				</view>
				<!-- <view class="select-item" @click="onClickAnonymousReport">
					<image src="/static/anonymous-report.png" mode="aspectFill"></image>
					<text>匿名举报</text>
				</view> -->
			</view>
			
			<!-- <view class="notice">
				* 匿名举报时，系统不会记录您的个人信息
			</view> -->
			
			<view class="btn">
				<button type="default" @click="onClickReportSearch">求助事项填报</button>
			</view>
		</view>
		
		<view class="fill"></view>
	</view>
</template>

<script setup>
	import { ref } from 'vue';
	import {barHeight, barTop} from '@/utils/bar.js'
	
	/**
	 * 点击实名举报
	 */
	const onClickRealNameReport = () => {
		uni.navigateTo({
			url: '/pages/fill-in-report/fill-in-report?type=1'
		})
	}
	
	/**
	 * 点击匿名举报
	 */
	const onClickAnonymousReport = () => {
		uni.navigateTo({
			url: '/pages/fill-in-report/fill-in-report?type=2'
		})
	}
	
	/**
	 * 点击举报查询
	 */
	const onClickReportSearch = () => {
		uni.navigateTo({
			url: '/pages/report-search/report-search'
		})
	}
</script>

<style lang="scss" scoped>
	.container {
		min-height: 100vh;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		padding: 0 40rpx;
		/* 兼容 iOS 设备 */
		padding-bottom: constant(safe-area-inset-bottom);
		/* 兼容 iPhone X 及以上设备 */
		padding-bottom: env(safe-area-inset-bottom);
		background:
			linear-gradient(to bottom, transparent, #eef1f4 100%),
			linear-gradient(to bottom, rgba(21, 87, 176, 1) 40%, rgba(0, 212, 255, 1));
	}
	
	.city-tech-image {
		width: calc(100vw - 80rpx);
	}
	
	.content {
		flex: 1;
		background-color: #fff;
		margin: 40rpx 0;
		border-radius: 20rpx;
		
		.selects {
			height: 400rpx;
			display: flex;
			align-items: center;
			justify-content: space-around;
			margin: 0 80rpx;
			
			.select-item {
				width: 180rpx;
				height: 180rpx;
				border-radius: 20rpx;
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;
				
				image {
					width: 100rpx;
					height: 100rpx;
					margin: 15rpx 30rpx 5rpx;
				}
				
				text {
					color: #fff;
					font-size: 36rpx;
				}
			}
			
			.select-item:nth-of-type(1) {
				background-color: #2F80ED;
			}
			
			.select-item:nth-of-type(2) {
				background-color: #FBAC45;
			}
		}
		
		.notice {
			color: #2F80ED;
			font-size: 40rpx;
			padding: 0 60rpx 40rpx;
			text-align: center;
			line-height: 60rpx;
			height: 200rpx;
		}
		
		.btn {
			padding: 0 60rpx;
			
			button {
				background-color: #2E80EE;
				color: #fff;
				width: 100%;
				height: 100rpx;
				line-height: 100rpx;
				border-radius: 100rpx;
			}
		}
	}
	
	.fill {
		height: 200rpx;
	}
</style>